<template>
	<view style="padding: 30rpx;">
		<view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item v-if="order.orderStatus==sysConstant.PRE_ORDER_STATUS" :value-style="{'color':'#fa3534'}"
				title="评审状态" value="预审中" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item v-if="order.orderStatus==sysConstant.ING_ORDER_STATUS" :value-style="{'color':'#ff9900'}"
				title="评审状态" value="评审中" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item v-if="order.orderStatus==sysConstant.FINISH_ORDER_STATUS" :value-style="{'color':'#19be6b'}"
				title="评审状态" value="已完成" :arrow="false" hover-class="none"></u-cell-item>

		</view>
		<view style="background-color: #fff;border-radius: 16rpx;margin: 20rpx 0;">
			<u-cell-item title="单位名称" :value="order.govUnitName | dateFormat" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="项目名称" :value="order.itemName | dateFormat" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="资金来源" :value="order.moneyFrom | dateFormat" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="是否划分标段" :value="order.divideIntoSections | dateFormat" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="项目送审金额" :value="order.submissionAmount | textFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="实际审核金额" :value="order.actualAuditedAmount | textFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="项目审定金额" :value="order.approvedAmount | textFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="项目审减金额" :value="order.projectAuditReductionAmount | textFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="审减率" :value="order.reductionRate | rateFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="预审送审时间" :value="order.preStartTime | dateFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="预审完成时间" :value="order.preEndTime | dateFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="评审送审时间" :value="order.reviewStartTime | dateFormat" :arrow="false"
				hover-class="none"></u-cell-item>
			<u-cell-item title="评审完成时间" :value="order.reviewEndTime | dateFormat" :arrow="false"
				hover-class="none"></u-cell-item>
		</view>
		<view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item title="所在阶段说明" :label="order.notes" :arrow="false" hover-class="none"></u-cell-item>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderId: '',
				order: '',
				sysConstant: this.sysConstant
			}
		},
		filters: {
			textFormat(value) {
				if (!value) return '----';
				return value.toFixed(2)
			},
			dateFormat(value) {
				if (!value) return '----';
				return value
			},
			rateFormat(value) {
				if (!value) return '----';
				return value + "%"
			}
		},
		onLoad(opt) {
			this.orderId = opt.orderId
			this.initOrderInfo()
		},
		methods: {
			initOrderInfo() {
				this.$u.get("/review/order/info/" + this.orderId).then(res => {
					if (res.success) {
						this.order = res.data
					}
				})
			}
		}
	}
</script>

<style>

</style>